package com.cc.enums;

import com.cc.exception.BaseErrorInfoInterface;

/**
 * 公用返回描述枚举类
 */
public enum CommonEnum implements BaseErrorInfoInterface {

	SUCCESS(200, "success！"),
	PARAMETER_FAILED(402, "参数异常！"),
	BODY_NOT_MATCH(400,"业务数据运行异常!"),
	SIGNATURE_NOT_MATCH(401,"用户名或密码错误！"),
	NOT_FOUND(404, "未找到该资源!"),
	INTERNAL_SERVER_ERROR(500, "服务器内部错误!"),
	SERVER_BUSY(503,"服务器正忙，请稍后再试!")
	;

	/** 状态码 */
	private int resultCode;

	/** 返回描述 */
	private String resultMsg;

	CommonEnum(int resultCode, String resultMsg) {
		this.resultCode = resultCode;
		this.resultMsg = resultMsg;
	}


	@Override
	public int getResultCode() {
		return resultCode;
	}

	@Override
	public String getResultMsg() {
		return resultMsg;
	}

}
